﻿using Business.Base;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Pumptester.ExperimentForms.Base
{
    public partial class BaseMainFormEnhance : BaseMainForm
    {
        public BaseMainFormEnhance()
        {
            InitializeComponent();
        }


        /*

        /// <summary>
        /// 在界面上展示记录
        /// </summary>
        /// <param name="record">新增的记录</param>
        protected override void ShowRecord(ExperimentRecord record)
        { }

        /// <summary>
        /// 删除选中的记录
        /// </summary>
        protected virtual void DeleteSelectRecord()
        { }

        /// <summary>
        /// 删除所有的记录
        /// </summary>
        protected virtual void DeleteAllRecord()
        { }

        /// <summary>
        /// 展示报表视图
        /// </summary>
        protected virtual void ShowReport()
        {
        }

        /// <summary>
        /// 保存图标视图
        /// </summary>
        protected virtual void SaveChart()
        { }

        /// <summary>
        /// 展示报表视图
        /// </summary>
        protected virtual void ShowList()
        {

        }

        /// <summary>
        /// 根据ChartData绘制报表
        /// </summary>
        /// <param name="chartData">绘制报表所需要的数据封装</param>
        protected virtual void DrawChart(BaseChartData chartData)
        {
        }

        /// <summary>
        /// 清除报表
        /// </summary>
        protected virtual void ClearChart()
        {
        }


        /// <summary>
        /// 每次获取数据的时候，用于重新计算和绘制报表，暂时放在主类中。
        /// </summary>
        protected virtual void CaculateAndReDrawReport()
        {
            BaseChartData chartData = this.Service.CaculateChartData(this.Experiment);
            if (chartData != null)
            {
                DrawChart(chartData);
            }
            else
            {
                ClearChart();
            }
        }
        */
    }
}
